<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="java.util.*" %> 
<%@ page import="com.ipartek.fila2.bean.Alumno" %>
<%@ include file="includes/head.jsp" %>

	<h1>Listado Ranking Alumnos</h1>
	<br/><hr/><br/>
	<table border="1">
		<thead>
			<th style="width:40%">Nombre</th>
			<th style="width:40%">Apellido</th>
			<th style="width:20%">Tiradas</th>
		</thead>
		<tbody>
			<% 	if (request.getAttribute("alumnos") != null)
			   	{
					ArrayList<Alumno> lista = (ArrayList<Alumno>)request.getAttribute("alumnos");
					for(Alumno alumno : lista) {
						out.print("<tr>");
						out.print("<td>"+ alumno.getNombre() +"</td>");
						out.print("<td>"+ alumno.getApellido1() +"</td>");
						out.print("<td>"+ alumno.getNum_tiradas() +"</td>");
						out.print("</tr>");
					}
			   	}else {
				    out.println("no data in array");
				}
			%>
		</tbody>
	</table>

<%@ include file="includes/footer.jsp" %>